package com.ala4.oxcafe.dto;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotEmpty;
import jakarta.validation.constraints.NotNull;
import lombok.Data;

import java.util.List;

/**
 * 用户分配角色
 *
 * @author PING
 * @version 1.0.0
 * @date 2025/8/12 17:59
 */
@Data
@Schema(description = "用户角色关联表")
public class UserRoleRelDTO {

    @Schema(description = "用户ID")
    @NotNull(message = "用户ID不能为空")
    private Long userId;

    @Schema(description = "角色ID列表")
    @NotNull(message = "角色ID列表不能为空")
    @NotEmpty(message = "角色ID列表不能为空")
    private List<Long> roleIds;

    public UserRoleRelDTO() {
    }

    public UserRoleRelDTO(Long userId, List<Long> roleIds) {
        this.userId = userId;
        this.roleIds = roleIds;
    }
}
